#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pdb

#using map_source file to generate digitwhu's map path infomation
#sql foramt
#INSERT INTO [digitwhu].[dbo].[node]
#           ([id])
#     VALUES
#           (<id, int,>)
#GO


#street_info foramt
#node_id pahts

#pre-header
output = ''
header = """
INSERT INTO [digitwhu].[dbo].[node]
           ([id])
     VALUES
"""

body = ''
f = open('path_info')
content = f.read()
lines = content.split('\n')
for line in lines:
	node_id = line.split(' ')[0]
	#文件结束
	if( node_id == '' ):
		continue
	body += '({0}),'.format(node_id)

#删除结尾逗号
body = body[0:-1]


#after-footer
footer = """
GO
"""

print header + body + footer
